﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>测试连接线</title>
    <link href="Css/site.css" rel="stylesheet" />
    <script src="Global/Config.js"></script>
    <script src="Jquery/jquery-1.10.2.js"></script>
    <script src="Jquery/angular.1.2.0.min.js"></script>
    <script src="Jquery/template.js"></script>
    <script src="XEngine/LineUtil.js"></script>
    <script src="XEngine/XEngine.js"></script>
    <script src="XEngine/XSVG.js"></script>
    <script src="XEngine/XNode.js"></script>
    <script src="XWorkflow/XWFDesigner.js"></script>
    <script src="XWorkflow/XWFActivity.js"></script>


</head>
<body style="width: 100%; height: 100%; padding: 0px; margin: 0px;">
    <div id="wf">
    </div>
</body>
</html>
<script type="text/javascript">
    var designer = null;
    var diagramUrl = null;
    window.onload = function () {
        designer = new XWFDesigner();
        designer.init(document.getElementById('wf'), onDesignerInited);
    };

    function onDesignerInited() {
        if (diagramUrl != null) {
            designer.loadDiagramFromUrl(diagramUrl);
        } else {
            designer.new();
        }
        designer.addActivity(10, 10, 50, 50, new XWFProcess());
        designer.addActivity(10, 110, 50, 50, new XWFEnd());
        designer.addActivity(10, 210, 50, 50, new XWFDecision());
        designer.event('SelectedElementChanged', onSelectedChanged);
    }

    function onSelectedChanged(element) {
        document.title = "element:" + element.getName();
    }
</script>
